<template>
  <div class="detail-list">
    <div v-if="vlist.length!==0">
      <div v-for="(item, index) in vlist" :key="index">
        <!-- <van-icon class-prefix="iconfont" name="iconsousuo"></van-icon> -->

        <van-cell :title="item.title" title-class="red" class="iconfont iconjiantou" is-link></van-cell>
        <div v-if="item.children" class="item-children">
          <detail-list :vlist="item.children"></detail-list>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "DetailList",
  components: {},
  props: {
    vlist: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  data() {
    return {};
  },
  methods: {
    // *******************************网络请求*******************************
    // *******************************逻辑处理*******************************
  },
  computed: {},
  watch: {},
  //生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
  updated() {}, //生命周期 - 更新之后
  activated() {} //如果页面有keep-alive缓存功能，这个函数会触发
};
</script>
<style lang='stylus' scoped>
.item-children {
  margin-left: 10px;
}

.van-cell__title {
  margin-left: 3px;
}

.red {
  color: red;
}
</style>